import com.itc.bi.service.impl.ClickHouseJDBCService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @BelongsProject: itc-airport-cloud
 * @BelongsPackage: PACKAGE_NAME
 * @Author: hecaiy
 * @CreateTime: 2024-06-29  11:21
 * @Description: TODO
 * @Version: 1.0
 */

@RunWith(SpringRunner.class)
@SpringBootTest
public class test {
    @Autowired
    private ClickHouseJDBCService clickHouseJDBCService;;

    @Test
    public void test() throws SQLException {
        Connection conn = clickHouseJDBCService.getConn();
        PreparedStatement pstmt = conn.prepareStatement("insert into t_order02 values(111, 'sku_004', 2500.00,'2021-06-01 12:00:00')");
        pstmt.execute();
        pstmt.close();
    }
}
